< previous page page_292 next page >

Page 292
Summary
Well, you've had a busy day. You've reviewed the two main methods of accessing data in a database from within a Visual Basic application. You've seen how to use the ActiveX Data Control and bound controls to automatically access, display, modify, and delete information. Also, you saw how to perform the same actions by using ActiveX Data Objects instead of the ActiveX Data Control.
Finally, these methods were used to add some initialization code to the address book application and to enhance the data-entry form by using a combo box and data-access commands. What all this allows you to do is create a feature-rich database application that your users can work with.
Q&A
Q Can both access methods be used in the same routine?
A Yes, you can use either or both of the access methods in the same routine. It all depends on what you need done.
Q What methods can you use to position the database to a particular record?
A You would use the Find and Move methods to position the database: Find,, MoveLast, MoveFirst, MoveNext, and MoveLast.
Q How do you specify a field name inside a ADO statement that includes spaces in its name?
A You must enclose the field name in square brackets ([]) if the field name contains blanks.
Q What do the EOF and BOF values determine?
A EOF determines the end of the file; BOF determines the beginning of the file.
Workshop
The Workshop provides quiz questions to help solidify your understanding of the material covered, as well as exercises to provide you with experience in using what you've learned. Try to understand the quiz and exercise answers before continuing on to the next day's lesson. Answers are provided in Appendix A, Answers to Exercises.
Quiz
1. What's the difference between ActiveX Data Control access and ActiveX Data Objects?

 
< previous page page_292 next page >

If you like this book, buy it!